package com.livegoods.controller;

import com.livegoods.pojo.LivegoodsResult;
import com.livegoods.service.HouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class HouseController {

    @Autowired
    private HouseService houseService;

    @RequestMapping("/init")
    public long init(){
        return houseService.init();
    }


    @RequestMapping("/search")
    public LivegoodsResult search(String city,String content,int page){
        return  houseService.search(city,content,page);
    }
}
